#include "ffz/bit-ops.h"
// uint16_t MOD = 255;
void setUInt16(uint8_t *data, uint16_t val)
{
	uint8_t singlePart = val & UINT16_MAX;
	val = val >> 8;
	uint8_t hexPart = val & UINT16_MAX;
	*data = hexPart;
	*(data + 1) = singlePart;
}

uint16_t getUInt16(const uint8_t *data)
{
	uint16_t val;
	uint8_t hexPart = *data;
	uint8_t singlePart = *(data + 1);
	val = hexPart;
	val = val << 8;
	val += singlePart;
	return val;
}